package cn.summit.exception;

/**
 * 自定义业务异常
 *
 * @author summit
 * @since 2020/7/30 16:43
 */
public class SystemException extends BaseException {

    private static final long serialVersionUID = -2935076946608056143L;
    private String statusCode = "BIZ999999";

    public SystemException(String message) {
        super(message);
    }

    public SystemException(String message, String statusCode) {
        super(message);
        this.statusCode = statusCode;
    }

    public SystemException(StatusCode statusCode, Object... vals) {
        super(format(statusCode.getFormat(), vals));
        this.statusCode = statusCode.getCode();
    }

    public String getStatusCode() {
        return this.statusCode;
    }


}
